package com.sky.dto;

import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

import javax.validation.constraints.*;

@Data
@AllArgsConstructor
@NoArgsConstructor
public class AddEmplyeeDTO {
   @NotNull(message = "姓名不能为空")
   @Size(min = 2,max = 10,message = "姓名只能是2-10位")
    private  String name;
    @NotNull(message = "手机号不能为空")
    @Pattern(regexp = "1[0-9]{10}",message = "手机号格式有误")
    private String phone;
    @Max(1)
    @Min(0)
    private String sex;
    @Size(min = 18,max = 18,message = "身份证号必须是18位")
    private String idNumber;
    @NotNull(message = "用户名不能为空")
    @Size(min = 2,max = 10,message = "用户名只能是2-10位")
    private String username;
}
